﻿




using System.Collections.Generic;
using System.Web.Mvc;
using Hotpot.Modules.Blogs.Models;
using Hotpot.Modules.Blogs.Services;
using Hotpot.Modules.Tags.Models;
using Hotpot.ViewModels;

namespace Hotpot.Modules.Blogs.Controllers
{
    public class TagController : Controller
    {
        private readonly IBlogsTagService tagService;

        public TagController(IBlogsTagService tagService)
        {
            this.tagService = tagService;
        }

        public HotpotViewModelItems<KeyValuePair<PostTag, int>> Cloud()
        {
            return new HotpotViewModelItems<KeyValuePair<PostTag, int>>(tagService.GetTagsWithPostCount()) { Container = new TagCloudPageContainer() };
        }
    }
}
